<div class="modal" ng-controller="FlowableDataPropertiesPopupCtrl">
  <div class="modal-dialog modal-wide">
    <div class="modal-content">
      <div class="modal-header">
        <button aria-hidden="true" class="close" data-dismiss="modal" ng-click="close()" type="button">&times;</button>
        <h2>{{'PROPERTY.PROPERTY.EDIT.TITLE' | translate}} "{{property.title | translate}}"</h2>
      </div>
      <div class="modal-body">

        <div class="row row-no-gutter">
          <div class="col-xs-6">
            <div class="kis-listener-grid" ng-if="translationsRetrieved" ui-grid="gridOptions" ui-grid-selection></div>
            <div class="pull-right">
              <div class="btn-group">
                <a class="btn btn-icon btn-lg" data-original-title="" data-placement="bottom"
                   data-title="{{'ACTION.MOVE.UP' | translate}}" ng-click="movePropertyUp()" rel="tooltip" title=""><i
                        class="glyphicon glyphicon-arrow-up"></i></a>
                <a class="btn btn-icon btn-lg" data-original-title="" data-placement="bottom"
                   data-title="{{'ACTION.MOVE.DOWN' | translate}}" ng-click="movePropertyDown()" rel="tooltip" title=""><i
                        class="glyphicon glyphicon-arrow-down"></i></a>
              </div>
              <div class="btn-group">
                <a class="btn btn-icon btn-lg" data-original-title="" data-placement="bottom"
                   data-title="{{'ACTION.ADD' | translate}}" ng-click="addNewProperty()" rel="tooltip" title=""><i
                        class="glyphicon glyphicon-plus"></i></a>
                <a class="btn btn-icon btn-lg" data-original-title="" data-placement="bottom"
                   data-title="{{'ACTION.REMOVE' | translate}}" ng-click="removeProperty()" rel="tooltip" title=""><i
                        class="glyphicon glyphicon-minus"></i></a>
              </div>
            </div>
          </div>

          <div class="col-xs-6">
            <div ng-show="selectedProperty">

              <div class="form-group">
                <label for="idField">{{'PROPERTY.DATAPROPERTIES.ID' | translate}}</label>
                <input class="form-control" id="idField" ng-model="selectedProperty.dataproperty_id"
                       placeholder="{{'PROPERTY.DATAPROPERTIES.ID.PLACEHOLDER' | translate }}"
                       type="text"/>
              </div>
              <div class="form-group">
                <label for="nameField">{{'PROPERTY.DATAPROPERTIES.NAME' | translate}}</label>
                <input class="form-control" id="nameField" ng-model="selectedProperty.dataproperty_name"
                       placeholder="{{'PROPERTY.DATAPROPERTIES.NAME.PLACEHOLDER' | translate }}"
                       type="text"/>
              </div>
              <div class="form-group">
                <label for="typeField">{{'PROPERTY.DATAPROPERTIES.TYPE' | translate}}</label>
                <select class="form-control" id="typeField" ng-change="propertyTypeChanged()"
                        ng-model="selectedProperty.dataproperty_type">
                  <option selected>string</option>
                  <option>boolean</option>
                  <option>datetime</option>
                  <option>double</option>
                  <option>int</option>
                  <option>long</option>
                </select>
              </div>
              <div class="form-group">
                <label for="valueField">{{'PROPERTY.DATAPROPERTIES.VALUE' | translate}}</label>
                <input class="form-control" id="valueField" ng-model="selectedProperty.dataproperty_value"
                       placeholder="{{'PROPERTY.DATAPROPERTIES.VALUE.PLACEHOLDER' | translate }}"
                       type="text"/>
              </div>
            </div>
            <div class="muted no-property-selected" ng-show="!selectedProperty" translate>
              PROPERTY.DATAPROPERTIES.EMPTY
            </div>
          </div>
        </div>

      </div>
      <div class="modal-footer">
        <button class="btn btn-primary" ng-click="cancel()" translate>ACTION.CANCEL</button>
        <button class="btn btn-primary" ng-click="save()" translate>ACTION.SAVE</button>
      </div>
    </div>
  </div>
</div>
